<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/1/18
 * Time: 15:39
 */

namespace addons\admin\service;


class Order
{
    /**
     * 获取商家的社区订单商品信息(代发货)
     */
    static function community_order_goods($seller_id,$order_status)
    {
        $c = new \app\common\model\Order();
        $data = $c
            ->field('shop_order_item.*,shop_order.community_id,shop_community.community_name')
            ->join('shop_community','shop_order.community_id=shop_community.id')
            ->join('shop_order_item','shop_order.order_id=shop_order_item.order_id')
            ->where('shop_order.seller_id',$seller_id)
            ->where('shop_order.order_status_id',$order_status)
            ->select();
        return $data;
    }

}